#include <stdio.h>


typedef struct stu 
{
    double dou_arr_1[10000];
    double dou_arr_2[10000];
    int in[50000];
}stu;

void stu_cpy(stu stu1)  // 值传递 需要创建一片 360000 字节空间
{
    int sum;
    printf("%ld\n" , sizeof(stu1));
    for (size_t i = 0; i < 49999; i++)
    {
        sum = stu1.in[i] + stu1.in[i+1];
    }
    printf("%d\n" , sum);
}

void stu_cpy_1(stu  * stu1) // 引用传递 需要创建一片 8 字节空间
{
    int sum;
    printf("%ld\n" , sizeof(stu1));
    for (size_t i = 0; i < 49999; i++)
    {
        sum = stu1->in[i] + stu1->in[i+1];
    }
    printf("%d\n" , sum);
}

int main(int argc, char const *argv[])
{
    stu stu_1[5];
    for (size_t i = 0; i < 50000; i++)
    {
        stu_1[0].in[i] = i;
    }
    
    stu_cpy(stu_1[0]);
    
    stu_cpy_1(stu_1);

    return 0;
}


